<!DOCTYPE html>
<html>
<head>
    <title></title>
    #parse("sys/header.html")
</head>
<body>
<style>
    .goodslist_box{
        display: flex;
    }
    .goodslist_item{
        width:150px;
        text-align: left;
        display: inline-block;
        margin:5px 0;
        margin-right: 5px;
    }
    .goodslist_item .g_wrapper{
        border:1px solid #eaeefb ;
    }
    .goodslist_item .g_l1{
        font-size:16px;
        margin:5px 0;
        font-weight: 700;
    }
    .goodslist_item .g_l2{
        border-bottom:1px solid #eaeefb ;
        padding:6px;
        line-height: 14px;
        word-break:break-all;
    }
    .goodslist_item .g_l3{
        display: block;
        border-bottom:1px solid #eaeefb ;
        padding:6px;
        line-height: 14px;
        word-break:break-all;
    }
    .goodslist_item .g_l5{
        display: block;
        border-bottom:1px solid #eaeefb ;
        padding:6px;
        line-height: 14px;
        word-break:break-all;
    }
    .goodslist_item .g_l4{

      padding:6px;
    }
    .goodslist_item .g_l4 img{
        width:100%;
    }
</style>
<div id="rrapp" v-cloak>
    <div v-show="!detail&&showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.orderSn" @on-enter="query" placeholder="订单号"/>
                </i-col>
                <i-col span="4">
                    <i-select v-model="q.orderStatus">
                        <i-option value="0">待付款</i-option>
                        <i-option value="101">订单已取消</i-option>
                        <i-option value="102">订单已删除</i-option>
                        <i-option value="201">订单已付款</i-option>
                        <i-option value="300">订单已发货</i-option>
                        <i-option value="301">用户确认收货</i-option>
                        <i-option value="302">自提</i-option>
                        <i-option value="401">退款</i-option>
                        <i-option value="402">完成</i-option>
                    </i-select>
                </i-col>

                <i-col span="4">
                    <i-input v-model="q.province" @on-enter="query" placeholder="收货省份"/>
                </i-col>
                <!--<i-col span="4">-->
                    <!--<i-select v-model="q.orderType">-->
                        <!--<i-option value="1">普通订单</i-option>-->
                        <!--<i-option value="2">团购订单</i-option>-->
                        <!--<i-option value="3">砍价订单</i-option>-->
                        <!--<i-option value="4">立即购买</i-option>-->
                    <!--</i-select>-->
                <!--</i-col>-->

                <i-button @click="query">查询</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("order:export"))
                <i-button type="success" @click="orderExport">导出</i-button>
                #end
                <i-button type="success" @click="selfCarry">自提</i-button>
                #if($shiro.hasPermission("order:sendGoods"))
                <i-button type="warning" @click="sendGoods">发货</i-button>
                #end
                #if($shiro.hasPermission("order:confirm"))
                <i-button type="error" @click="confirm">确认收货</i-button>
                #end
            </div>
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList&&!detail">
        <p slot="title">{{title}}</p>
        <i-form :model="order" :label-width="100">
            <Form-item label="快递公司" prop="shippingId">
                <i-select v-model="order.shippingId" filterable>
                    <i-option v-for="shipping in shippings" :value="shipping.id" :key="shipping.id">{{shipping.name}}
                    </i-option>
                </i-select>
            </Form-item>
            <Form-item label="快递单号" prop="shippingNo">
                <i-input v-model="order.shippingNo" placeholder="快递单号"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="saveOrUpdate">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
            </Form-item>
        </i-form>
    </Card>

    <Card v-show="detail">
        <p slot="title" style="height: auto">
            {{title}}
        </p>
        <i-form ref="formValidate" :model="order" :label-width="80">
            <Form-item label="订单号" prop="orderSn">
                <i-input v-model="order.orderSn" readonly/>
            </Form-item>
            <Form-item label="会员" prop="userName">
                <i-input v-model="order.userName" readonly/>
            </Form-item>
            <!--<Form-item label="订单类型" prop="orderType">-->
                <!--<i-select v-model="order.orderType" disabled>-->
                    <!--<i-option value="1">普通订单</i-option>-->
                    <!--<i-option value="2">团购订单</i-option>-->
                    <!--<i-option value="3">砍价订单</i-option>-->
                    <!--<i-option value="4">立即购买</i-option>-->
                <!--</i-select>-->
            <!--</Form-item>-->
            <Form-item label="订单状态" prop="orderStatus" readonly>
                <Radio-group v-model="order.orderStatus">
                    <Radio label="0" disabled>
                        <span>待付款</span>
                    </Radio>
                    <Radio label="101" disabled>
                        <span>订单已取消</span>
                    </Radio>
                    <Radio label="102" disabled>
                        <span>订单已删除</span>
                    </Radio>
                    <Radio label="201" disabled>
                        <span>订单已付款</span>
                    </Radio>
                    <Radio label="300" disabled>
                        <span>订单已发货</span>
                    </Radio>
                    <Radio label="301" disabled>
                        <span>用户确认收货</span>
                    </Radio>
                    <Radio label="302" disabled>
                        <span>自提</span>
                    </Radio>
                    <Radio label="401" disabled>
                        <span>退款</span>
                    </Radio>
                    <Radio label="402" disabled>
                        <span>完成</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="发货状态" prop="shippingStatus">
                <Radio-group v-model="order.shippingStatus">
                    <Radio label="0" disabled>
                        <span>待发货</span>
                    </Radio>
                    <Radio label="1" disabled>
                        <span>已发货</span>
                    </Radio>
                    <Radio label="2" disabled>
                        <span>已收货</span>
                    </Radio>
                    <Radio label="4" disabled>
                        <span>退货</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="付款状态" prop="payStatus">
                <Radio-group v-model="order.payStatus">
                    <Radio label="0" disabled>
                        <span>待付款</span>
                    </Radio>
                    <Radio label="1" disabled>
                        <span>付款中</span>
                    </Radio>
                    <Radio label="2" disabled>
                        <span>已付款</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="收货人" prop="consignee">
                <i-input v-model="order.consignee" readonly/>
            </Form-item>
            <Form-item label="收货地址" prop="address">
                <i-input v-model="order.address" readonly/>
            </Form-item>
            <Form-item label="联系电话" prop="mobile">
                <i-input v-model="order.mobile" readonly/>
            </Form-item>
            <Form-item label="快递公司" prop="shippingName">
                <i-input v-model="order.shippingName" readonly/>
            </Form-item>
            <Form-item label="快递单号" prop="shippingNo">
                <i-input v-model="order.shippingNo" readonly/>
            </Form-item>
            <Form-item label="付款方" prop="payName">
                <i-input v-model="order.payName" readonly/>
            </Form-item>
            <Form-item label="快递费用" prop="shippingFee">
                <i-input v-model="order.shippingFee" readonly/>
            </Form-item>
            <Form-item label="实际支付" prop="actualPrice">
                <i-input v-model="order.actualPrice" />
            </Form-item>
            <Form-item label="订单总价" prop="orderPrice">
                <i-input v-model="order.orderPrice" readonly/>
            </Form-item>
            <Form-item label="商品总价" prop="goodsPrice">
                <i-input v-model="order.goodsPrice" readonly/>
            </Form-item>
            <Form-item label="下单时间" prop="addTime">
                <Date-picker v-model="order.addTime" placeholder="使用时间" readonly/>
            </Form-item>
            <Form-item label="付款时间" prop="payTime">
                <Date-picker v-model="order.payTime" placeholder="使用时间" readonly/>
            </Form-item>
            <Form-item label="配送费用" prop="freightPrice">
                <i-input v-model="order.freightPrice" readonly/>
            </Form-item>
            <Form-item label="备注" prop="postscript">
                <i-input v-model="order.postscript" readonly/>
            </Form-item>
            <Form-item label="商品信息" prop="goodsSpecifitionNameValue">
            <div class="goodslist_box">
                <div class="goodslist_item" v-for="(item,index) in goodsArr" :key="index">
                    <h5 class="g_l1">商品{{index+1}}</h5>
                    <div class="g_wrapper">
                        <p class="g_l2">{{item.goodsName}}</p>
                        <span class="g_l3">规格:{{item.goodsSpecifitionNameValue}}</span>
                        <div class="g_l5">数量:{{item.number}}</div>
                        <div class="g_l4">
                            <img :src="item.listPicUrl" alt="" >
                        </div>
                    </div>

                </div>
            </div>
<!--                <i-input v-model="order.goodsSpecifitionNameValue" readonly/>-->
            </Form-item>
<!--            <Form-item label="商品名称" prop="goodsName">-->
<!--                <i-input v-model="order.goodsName" readonly/>-->
<!--            </Form-item>-->
<!--            <Form-item label="商品图片" prop="listPicUrl">-->
<!--                <i-input v-model="order.listPicUrl" readonly/>-->
<!--            </Form-item>-->



                        <Form-item>
                            <i-button type="info" @click="handleUpdate" style="margin-left: 8px"/>
                            保存</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
            </Form-item>
        </i-form>
    </Card>

</div>
<script src="${rc.contextPath}/js/shop/order.js?_${date.systemTime}"></script>
</body>
</html>